//
//  MusicPageViewController.m
//  SinceLe
//
//  Created by 李元喜 on 15/11/18.
//  Copyright © 2015年 李元喜. All rights reserved.
//


#import "MusicPageViewController.h"
#import "MusicModel.h"
#import "NetWorkHandle.h"
#import <UIImageView+WebCache.h>
#import "Macrocs.h"


@interface MusicPageViewController ()<UITableViewDelegate,UITableViewDataSource>

@property (nonatomic, strong)UITableView *tableView;
@property (nonatomic, strong)NSMutableArray *dataArray;
@property (nonatomic, strong)UILabel *lable;

@end

@implementation MusicPageViewController

- (void)viewDidLoad {
    
    [super viewDidLoad];
    [self loadTableView];
}

- (void)loadTableView
{
    _tableView = [[UITableView alloc]initWithFrame:self.view.frame style:UITableViewStylePlain];
    self.tableView.delegate = self;
    self.tableView.dataSource = self;
    
//加载XIB
    UINib *nib = [UINib nibWithNibName:@"MusicPageCell" bundle:nil];
    [_tableView registerNib:nib forCellReuseIdentifier:@"CELL"];
    
    [self.view addSubview:_tableView];
    self.view.backgroundColor = [UIColor yellowColor];
    
}


-(CGFloat)tableView:(UITableView *)tableView estimatedHeightForFooterInSection:(NSInteger)section
{
    return 200;
}


-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return _dataArray.count;
    
}

-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"CELL" forIndexPath:indexPath];
    
    return cell;

}

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(nonnull NSIndexPath *)indexPath{
    
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
